package com.ruoyi.common.core.domain;

import com.ruoyi.common.enums.common.State;
import com.ruoyi.common.validation.group.UpdateBatchGroup;
import com.ruoyi.common.validation.group.UpdateGroup;
import lombok.Data;

import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;
import java.io.Serializable;
import java.util.List;

/**
 * @Classname StateVo
 * @Author: sunluquan
 * @Date: 2021/12/27 09:53
 * @Description TODO
 * 通用的状态修改数据 vo 模型
 */
@Data
public class StateVo<T extends Serializable>{

    /**主键编号集合*/
    @NotEmpty(groups = UpdateBatchGroup.class,message = "主键编号不能为空")
    private List<T> ids;
    /**状态*/
    @NotNull(groups = {UpdateGroup.class, UpdateBatchGroup.class} , message="状态标识不能为空")
    private State state;

}
